<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

//商品属性模型

class Attribute_model extends CI_Model{

	const TBL_ATTR = 'attribute';
	const TBL_TYPE = 'goods_type';


	#获取指定类型下面所有的属性attr_input_type=1
	public function list_attrs($type_id,$attr_input_type=1){
		$condition['type_id'] = $type_id;
        $condition['attr_input_type'] = $attr_input_type;
		$query = $this->db->where($condition)->get(self::TBL_ATTR);
		return $query->result_array();
	}
}